<template>
    <div>
        <h1>子组件5</h1>
        <!-- 1.两种获取state里面数据的方式 --->
        <p>{{$store.state.num}}</p>
        <p>{{num}}</p>

        <!--   -->
        <p>{{$store.getters.dbNum}}</p>
        <p>{{dbNum}}</p>
    </div>
</template>

<script>
export default {
    name:'',
    components: {

    },
    props: {

    },
    data() {
        return {

        };
    },
    computed: {
        num(){
            return this.$store.state.num
        },
        dbNum(){
            return this.$store.getters.dbNum
        }
    },
};
</script>

<style scoped lang="less">

</style>
